//Page Object
import {request} from "../../request/index.js"
Page({
  data: {
    swiperList:[],
    cartList:[],
    floorList:[]
  },
  onLoad: function(options){
   this.getSwiperList();
   this.getCartList();
   this.getFloorList();
  },
  getSwiperList(){
    request({url: '/home/swiperdata'}).then(result=>{
      this.setData({
        swiperList: result.data.message
      })   
    })
  },
  getCartList(){
    request({url: '/home/catitems'}).then(result=>{
      this.setData({
        cartList: result.data.message
      })   
    })
  },
  getFloorList(){
    request({url: '/home/floordata'}).then(result=>{
      this.setData({
        floorList: result.data.message
      })   
    })
  }
});